#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>

int
main(int argc, char *argv[])
{
	printf("hello world (pid:%d)\n", (int)getpid());
	int rc =fork();
	if(rc < 0){
		fprintf(stderr, "fork failed\n");
		exit(1);
	}else if(rc == 0){
		printf("child: hello ");
	}else{
		//int wc = wait(NULL);
		sleep(0);
		printf("parent: goodbye!\n");
	}

	return 0;
}
